package com.sand.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sand.service.ActivityService;
import com.sand.util.DBControl;

@Controller
@RequestMapping("test")
public class TestAction {
	@Autowired
	public ActivityService service;
	
	@RequestMapping("firstAction")
	public String testJsonString(){
		try {
			DBControl.setDBType(DBControl.SDB);
			service.test();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return "error";
	}
	
	@ResponseBody
	@RequestMapping("testEhcache")
	public String testEhcache() throws Exception{
		return "";
	}
}
